package com.gitee.melin.bee.core.jdbc.enums;

import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.gitee.melin.bee.core.enums.BaseStringEnum;
import com.gitee.melin.bee.core.enums.jackson.JacksonEnumStringSerializer;
import org.apache.commons.lang3.StringUtils;

/** kafka sasl mchanism */
@JsonSerialize(using = JacksonEnumStringSerializer.class)
public enum SaslMchanism implements BaseStringEnum {
    PLAIN,
    SCRAM_SHA_256,
    SCRAM_SHA_512,
    GSSAPI;

    @JsonValue
    @Override
    public String getValue() {
        return this.name();
    }

    @Override
    public String toString() {
        return StringUtils.replace(this.name(), "_", "-");
    }
}
